package com.metier;

import java.io.Serializable;


/**
 * This is an object that contains data related to the utilisateur table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="utilisateur"
 */

public abstract class BaseUtilisateur  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static String REF = "Utilisateur";
	public static String PROP_CIVILITE = "Civilite";
	public static String PROP_DESCRIPT = "Descript";
	public static String PROP_ID_USER = "IdUser";
	public static String PROP_TELEPHONE = "Telephone";
	public static String PROP_PERMIS = "Permis";
	public static String PROP_PRENOM = "Prenom";
	public static String PROP_MDP = "Mdp";
	public static String PROP_CODEPOSTAL = "Codepostal";
	public static String PROP_VILLE = "Ville";
	public static String PROP_PAYS = "Pays";
	public static String PROP_CHANGEMENTNEWS = "Changementnews";
	public static String PROP_PHOTO = "Photo";
	public static String PROP_ADRESSE = "Adresse";
	public static String PROP_DATEINSCRIPTION = "Dateinscription";
	public static String PROP_NOM = "Nom";
	public static String PROP_EMAIL = "Email";
	public static String PROP_NBREFERENCE = "Nbreference";
	public static String PROP_FK_ETAT = "FkEtat";
	public static String PROP_DATENAISSANCE = "Datenaissance";


	// constructors
	public BaseUtilisateur () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseUtilisateur (java.lang.Integer idUser) {
		this.setIdUser(idUser);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseUtilisateur (
		com.metier.Etat fkEtat,
		java.util.Date dateinscription,
		java.lang.String nom,
		java.lang.String prenom,
		java.lang.String mdp,
		java.lang.String email,
		java.lang.String civilite,
		boolean changementnews,
		java.lang.Long nbreference,
		java.lang.String datenaissance) {

		this.setFkEtat(fkEtat);
		this.setDateinscription(dateinscription);
		this.setNom(nom);
		this.setPrenom(prenom);
		this.setMdp(mdp);
		this.setEmail(email);
		this.setCivilite(civilite);
		this.setChangementnews(changementnews);
		this.setNbreference(nbreference);
		this.setDatenaissance(datenaissance);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer idUser;

	// fields
	private java.lang.String adresse;
	private java.lang.String permis;
	private java.lang.String ville;
	private java.util.Date dateinscription;
	private java.lang.String photo;
	private java.lang.String nom;
	private java.lang.String prenom;
	private java.lang.String mdp;
	private java.lang.String codepostal;
	private java.lang.String email;
	private java.lang.String descript;
	private java.lang.String pays;
	private java.lang.String civilite;
	private boolean changementnews;
	private java.lang.String telephone;
	private java.lang.Long nbreference;
	private java.lang.String datenaissance;

	// many to one
	private com.metier.Etat fkEtat;

	// collections
	private java.util.Set<com.metier.News> setNews;
	private java.util.Set<com.metier.ContactTemp> contactTempSetByIdUser2;
	private java.util.Set<com.metier.ContactTemp> contactTempSetByIdUser1;
	private java.util.Set<com.metier.Contact> contactSetByIdUser2;
	private java.util.Set<com.metier.Contact> contactSetByIdUser1;
	private java.util.Set<com.metier.Experience> experienceSet;
	private java.util.Set<com.metier.News> newsSet;
	private java.util.Set<com.metier.Etude> etudeSet;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id_user"
     */
	public java.lang.Integer getIdUser () {
		return idUser;
	}

	/**
	 * Set the unique identifier of this class
	 * @param idUser the new ID
	 */
	public void setIdUser (java.lang.Integer idUser) {
		this.idUser = idUser;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: adresse
	 */
	public java.lang.String getAdresse () {
		return adresse;
	}

	/**
	 * Set the value related to the column: adresse
	 * @param adresse the adresse value
	 */
	public void setAdresse (java.lang.String adresse) {
		this.adresse = adresse;
	}



	/**
	 * Return the value associated with the column: permis
	 */
	public java.lang.String getPermis () {
		return permis;
	}

	/**
	 * Set the value related to the column: permis
	 * @param permis the permis value
	 */
	public void setPermis (java.lang.String permis) {
		this.permis = permis;
	}



	/**
	 * Return the value associated with the column: ville
	 */
	public java.lang.String getVille () {
		return ville;
	}

	/**
	 * Set the value related to the column: ville
	 * @param ville the ville value
	 */
	public void setVille (java.lang.String ville) {
		this.ville = ville;
	}



	/**
	 * Return the value associated with the column: dateinscription
	 */
	public java.util.Date getDateinscription () {
		return dateinscription;
	}

	/**
	 * Set the value related to the column: dateinscription
	 * @param dateinscription the dateinscription value
	 */
	public void setDateinscription (java.util.Date dateinscription) {
		this.dateinscription = dateinscription;
	}



	/**
	 * Return the value associated with the column: photo
	 */
	public java.lang.String getPhoto () {
		return photo;
	}

	/**
	 * Set the value related to the column: photo
	 * @param photo the photo value
	 */
	public void setPhoto (java.lang.String photo) {
		this.photo = photo;
	}



	/**
	 * Return the value associated with the column: nom
	 */
	public java.lang.String getNom () {
		return nom;
	}

	/**
	 * Set the value related to the column: nom
	 * @param nom the nom value
	 */
	public void setNom (java.lang.String nom) {
		this.nom = nom;
	}



	/**
	 * Return the value associated with the column: prenom
	 */
	public java.lang.String getPrenom () {
		return prenom;
	}

	/**
	 * Set the value related to the column: prenom
	 * @param prenom the prenom value
	 */
	public void setPrenom (java.lang.String prenom) {
		this.prenom = prenom;
	}



	/**
	 * Return the value associated with the column: mdp
	 */
	public java.lang.String getMdp () {
		return mdp;
	}

	/**
	 * Set the value related to the column: mdp
	 * @param mdp the mdp value
	 */
	public void setMdp (java.lang.String mdp) {
		this.mdp = mdp;
	}



	/**
	 * Return the value associated with the column: codepostal
	 */
	public java.lang.String getCodepostal () {
		return codepostal;
	}

	/**
	 * Set the value related to the column: codepostal
	 * @param codepostal the codepostal value
	 */
	public void setCodepostal (java.lang.String codepostal) {
		this.codepostal = codepostal;
	}



	/**
	 * Return the value associated with the column: email
	 */
	public java.lang.String getEmail () {
		return email;
	}

	/**
	 * Set the value related to the column: email
	 * @param email the email value
	 */
	public void setEmail (java.lang.String email) {
		this.email = email;
	}



	/**
	 * Return the value associated with the column: description
	 */
	public java.lang.String getDescript () {
		return descript;
	}

	/**
	 * Set the value related to the column: description
	 * @param description the description value
	 */
	public void setDescript (java.lang.String d) {
		this.descript = d;
	}



	/**
	 * Return the value associated with the column: pays
	 */
	public java.lang.String getPays () {
		return pays;
	}

	/**
	 * Set the value related to the column: pays
	 * @param pays the pays value
	 */
	public void setPays (java.lang.String pays) {
		this.pays = pays;
	}



	/**
	 * Return the value associated with the column: civilite
	 */
	public java.lang.String getCivilite () {
		return civilite;
	}

	/**
	 * Set the value related to the column: civilite
	 * @param civilite the civilite value
	 */
	public void setCivilite (java.lang.String civilite) {
		this.civilite = civilite;
	}



	/**
	 * Return the value associated with the column: changementnews
	 */
	public boolean isChangementnews () {
		return changementnews;
	}

	/**
	 * Set the value related to the column: changementnews
	 * @param changementnews the changementnews value
	 */
	public void setChangementnews (boolean changementnews) {
		this.changementnews = changementnews;
	}



	/**
	 * Return the value associated with the column: telephone
	 */
	public java.lang.String getTelephone () {
		return telephone;
	}

	/**
	 * Set the value related to the column: telephone
	 * @param telephone the telephone value
	 */
	public void setTelephone (java.lang.String telephone) {
		this.telephone = telephone;
	}



	/**
	 * Return the value associated with the column: nbreference
	 */
	public java.lang.Long getNbreference () {
		return nbreference;
	}

	/**
	 * Set the value related to the column: nbreference
	 * @param nbreference the nbreference value
	 */
	public void setNbreference (java.lang.Long nbreference) {
		this.nbreference = nbreference;
	}



	/**
	 * Return the value associated with the column: datenaissance
	 */
	public java.lang.String getDatenaissance () {
		return datenaissance;
	}

	/**
	 * Set the value related to the column: datenaissance
	 * @param datenaissance the datenaissance value
	 */
	public void setDatenaissance (java.lang.String datenaissance) {
		this.datenaissance = datenaissance;
	}



	/**
	 * Return the value associated with the column: fk_etat
	 */
	public com.metier.Etat getFkEtat () {
		return fkEtat;
	}

	/**
	 * Set the value related to the column: fk_etat
	 * @param fkEtat the fk_etat value
	 */
	public void setFkEtat (com.metier.Etat fkEtat) {
		this.fkEtat = fkEtat;
	}



	/**
	 * Return the value associated with the column: SetNews
	 */
	public java.util.Set<com.metier.News> getSetNews () {
		return setNews;
	}

	/**
	 * Set the value related to the column: SetNews
	 * @param setNews the SetNews value
	 */
	public void setSetNews (java.util.Set<com.metier.News> setNews) {
		this.setNews = setNews;
	}

	public void addToSetNews (com.metier.News news) {
		if (null == getSetNews()) setSetNews(new java.util.TreeSet<com.metier.News>());
		getSetNews().add(news);
	}



	/**
	 * Return the value associated with the column: ContactTempSetByIdUser2
	 */
	public java.util.Set<com.metier.ContactTemp> getContactTempSetByIdUser2 () {
		return contactTempSetByIdUser2;
	}

	/**
	 * Set the value related to the column: ContactTempSetByIdUser2
	 * @param contactTempSetByIdUser2 the ContactTempSetByIdUser2 value
	 */
	public void setContactTempSetByIdUser2 (java.util.Set<com.metier.ContactTemp> contactTempSetByIdUser2) {
		this.contactTempSetByIdUser2 = contactTempSetByIdUser2;
	}

	public void addToContactTempSetByIdUser2 (com.metier.ContactTemp contactTemp) {
		if (null == getContactTempSetByIdUser2()) setContactTempSetByIdUser2(new java.util.TreeSet<com.metier.ContactTemp>());
		getContactTempSetByIdUser2().add(contactTemp);
	}



	/**
	 * Return the value associated with the column: ContactTempSetByIdUser1
	 */
	public java.util.Set<com.metier.ContactTemp> getContactTempSetByIdUser1 () {
		return contactTempSetByIdUser1;
	}

	/**
	 * Set the value related to the column: ContactTempSetByIdUser1
	 * @param contactTempSetByIdUser1 the ContactTempSetByIdUser1 value
	 */
	public void setContactTempSetByIdUser1 (java.util.Set<com.metier.ContactTemp> contactTempSetByIdUser1) {
		this.contactTempSetByIdUser1 = contactTempSetByIdUser1;
	}

	public void addToContactTempSetByIdUser1 (com.metier.ContactTemp contactTemp) {
		if (null == getContactTempSetByIdUser1()) setContactTempSetByIdUser1(new java.util.TreeSet<com.metier.ContactTemp>());
		getContactTempSetByIdUser1().add(contactTemp);
	}



	/**
	 * Return the value associated with the column: ContactSetByIdUser2
	 */
	public java.util.Set<com.metier.Contact> getContactSetByIdUser2 () {
		return contactSetByIdUser2;
	}

	/**
	 * Set the value related to the column: ContactSetByIdUser2
	 * @param contactSetByIdUser2 the ContactSetByIdUser2 value
	 */
	public void setContactSetByIdUser2 (java.util.Set<com.metier.Contact> contactSetByIdUser2) {
		this.contactSetByIdUser2 = contactSetByIdUser2;
	}

	public void addToContactSetByIdUser2 (com.metier.Contact contact) {
		if (null == getContactSetByIdUser2()) setContactSetByIdUser2(new java.util.TreeSet<com.metier.Contact>());
		getContactSetByIdUser2().add(contact);
	}



	/**
	 * Return the value associated with the column: ContactSetByIdUser1
	 */
	public java.util.Set<com.metier.Contact> getContactSetByIdUser1 () {
		return contactSetByIdUser1;
	}

	/**
	 * Set the value related to the column: ContactSetByIdUser1
	 * @param contactSetByIdUser1 the ContactSetByIdUser1 value
	 */
	public void setContactSetByIdUser1 (java.util.Set<com.metier.Contact> contactSetByIdUser1) {
		this.contactSetByIdUser1 = contactSetByIdUser1;
	}

	public void addToContactSetByIdUser1 (com.metier.Contact contact) {
		if (null == getContactSetByIdUser1()) setContactSetByIdUser1(new java.util.TreeSet<com.metier.Contact>());
		getContactSetByIdUser1().add(contact);
	}



	/**
	 * Return the value associated with the column: ExperienceSet
	 */
	public java.util.Set<com.metier.Experience> getExperienceSet () {
		return experienceSet;
	}

	/**
	 * Set the value related to the column: ExperienceSet
	 * @param experienceSet the ExperienceSet value
	 */
	public void setExperienceSet (java.util.Set<com.metier.Experience> experienceSet) {
		this.experienceSet = experienceSet;
	}

	public void addToExperienceSet (com.metier.Experience experience) {
		if (null == getExperienceSet()) setExperienceSet(new java.util.TreeSet<com.metier.Experience>());
		getExperienceSet().add(experience);
	}



	/**
	 * Return the value associated with the column: NewsSet
	 */
	public java.util.Set<com.metier.News> getNewsSet () {
		return newsSet;
	}

	/**
	 * Set the value related to the column: NewsSet
	 * @param newsSet the NewsSet value
	 */
	public void setNewsSet (java.util.Set<com.metier.News> newsSet) {
		this.newsSet = newsSet;
	}

	public void addToNewsSet (com.metier.News news) {
		if (null == getNewsSet()) setNewsSet(new java.util.TreeSet<com.metier.News>());
		getNewsSet().add(news);
	}



	/**
	 * Return the value associated with the column: EtudeSet
	 */
	public java.util.Set<com.metier.Etude> getEtudeSet () {
		return etudeSet;
	}

	/**
	 * Set the value related to the column: EtudeSet
	 * @param etudeSet the EtudeSet value
	 */
	public void setEtudeSet (java.util.Set<com.metier.Etude> etudeSet) {
		this.etudeSet = etudeSet;
	}

	public void addToEtudeSet (com.metier.Etude etude) {
		if (null == getEtudeSet()) setEtudeSet(new java.util.TreeSet<com.metier.Etude>());
		getEtudeSet().add(etude);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.metier.Utilisateur)) return false;
		else {
			com.metier.Utilisateur utilisateur = (com.metier.Utilisateur) obj;
			if (null == this.getIdUser() || null == utilisateur.getIdUser()) return false;
			else return (this.getIdUser().equals(utilisateur.getIdUser()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getIdUser()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getIdUser().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}